package com.welab.springcloud.demo.api;

import com.welab.springcloud.demo.api.fallback.AuthApiFallback;
import com.welab.springcloud.demo.dto.AuthRequest;
import com.welab.springcloud.demo.dto.AuthResult;
import com.welab.springcloud.demo.dto.ResponseResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient(value = "USER-SERVICE", fallback = AuthApiFallback.class)
public interface AuthApi {

	@RequestMapping(value = "/auth")
	ResponseResult<AuthResult> auth(AuthRequest authRequest);

	@RequestMapping(value = "/parseToken")
	ResponseResult<Boolean> parseToken(@RequestParam String token);
}
